regex that all matches blank line

A regular expression that matches blank lines (lines that contain only whitespace or are completely empty) is:

^\s*$

Explanation:

This regex ensures that lines that contain only whitespace (or nothing at all) are matched.